/**
 * 
 */
package logic;

import java.util.List;

import javax.faces.bean.ManagedBean;

import model.BirthdayEntry;

/**
 * @author cellamaro
 *
 */
@ManagedBean(name="sideboardView")
public class SideboardView {
	public String getBirthdayList(){
		String output = "<ul>";
		Reminder reminder = new Reminder();
		List<BirthdayEntry> list = reminder.getAllBirthdays();
		for(BirthdayEntry be : list){
			output += "<li><a title=\""+be.getNote()+"\">"+be.getName()+" ("+Tools.DateFormat(be.getBirthday(),"dd.MM.YYYY")+") ("+be.getAge()+")</a></li>";
		}
		output += "</ul>";
		return output;
	}
}
